/**
 * Created by Reeves on 2017/5/15.
 */
Template.postCategoryNew.helpers({
    posts: function () {
        return Posts.find({}, {sort: {submitted: -1}});
    }
});

Template.postCategoryNew.events({
    'click #newBtn': function (e, template) {
        Router.go('/category/new/' + template.data.currentCategory);
    },
    'click #popularBtn': function (e, template) {
        Router.go('/category/' + template.data.currentCategory);
    }
});